// QMS
import request from "@/utils/axios";
import { URL_API } from "@/utils/mUtils";
const base = URL_API();

/**
 * 模板配置
 */
// 模板列表
export function formworkList(params) {
  return request({
    url: `${base}/api/qms/file/formwork/list`,
    method: "post",
    data: params,
  });
}
// 模板创建
export function formworkCreate(params) {
  return request({
    url: `${base}/api/qms/file/formwork/create`,
    method: "post",
    data: params,
  });
}
// 模板详情
export function formworkDetail(params) {
  return request({
    url: `${base}/api/qms/file/formwork/detail`,
    method: "post",
    data: params,
  });
}
// 模板列表
export function formworkUpdate(params) {
  return request({
    url: `${base}/api/qms/file/formwork/update`,
    method: "post",
    data: params,
  });
}
// 模板列表
export function formworkDelete(params) {
  return request({
    url: `${base}/api/qms/file/formwork/delete`,
    method: "post",
    data: params,
  });
}
// 模板验重
export function formworkExamine(params) {
  return request({
    url: `${base}/api/qms/file/formwork/examine`,
    method: "post",
    data: params,
  });
}
// 模板下拉
export function formworkOptions(params) {
  return request({
    url: `${base}/api/qms/file/formwork/options`,
    method: "post",
    data: params,
  });
}
// 质量文件列表
export function fileList(params) {
  return request({
    url: `${base}/api/qms/file/list`,
    method: "post",
    data: params,
  });
}
// 质量文件列表导出
export function fileListExport(params) {
  return request({
    url: `${base}/api/qms/file/list/export`,
    method: "post",
    data: params,
  });
}
// 创建质量文件
export function fileCreate(params) {
  return request({
    url: `${base}/api/qms/file/create`,
    method: "post",
    data: params,
  });
}
// 质量文件详情
export function fileDetail(params) {
  return request({
    url: `${base}/api/qms/file/detail`,
    method: "post",
    data: params,
  });
}
// 质量文件修改
export function fileUpdate(params) {
  return request({
    url: `${base}/api/qms/file/update`,
    method: "post",
    data: params,
  });
}
// 质量文件修改
export function fileDelete(params) {
  return request({
    url: `${base}/api/qms/file/delete`,
    method: "post",
    data: params,
  });
}
// 质量文件复审通过
export function fileReExamine(params) {
  return request({
    url: `${base}/api/qms/file/reexamine`,
    method: "post",
    data: params,
  });
}
// 质量文件受控/取消
export function fileControlled(params) {
  return request({
    url: `${base}/api/qms/file/controlled`,
    method: "post",
    data: params,
  });
}
// 质量文件作废
export function fileCancel(params) {
  return request({
    url: `${base}/api/qms/file/cancel`,
    method: "post",
    data: params,
  });
}
// 质量文件导出
export function fileExport(params) {
  return request({
    url: `${base}/api/qms/file/export`,
    method: "post",
    data: params,
  });
}
// 质量文件导出
export function fileExportList(params) {
  return request({
    url: `${base}/api/qms/file/export/list`,
    method: "post",
    data: params,
  });
}
// 质量文件作废
export function fileChangeCreate(params) {
  return request({
    url: `${base}/api/qms/file/change/create`,
    method: "post",
    data: params,
  });
}
// 培训材料列表
export function trainingMaterialList(params) {
  return request({
    url: `${base}/api/training/material/list`,
    method: "post",
    data: params,
  });
}
// 培训材料创建
export function trainingMaterialCreate(params) {
  return request({
    url: `${base}/api/training/material/create`,
    method: "post",
    data: params,
  });
}
// 培训材料详情
export function trainingMaterialDetail(params) {
  return request({
    url: `${base}/api/training/material/detail`,
    method: "post",
    data: params,
  });
}
// 培训材料编辑
export function trainingMaterialUpdate(params) {
  return request({
    url: `${base}/api/training/material/update`,
    method: "post",
    data: params,
  });
}
// 培训材料下拉
export function trainingMaterialOptions(params) {
  return request({
    url: `${base}/api/training/material/options`,
    method: "post",
    data: params,
  });
}
// 培训材料删除
export function trainingMaterialDelete(params) {
  return request({
    url: `${base}/api/training/material/delete`,
    method: "DELETE",
    data: params,
  });
}
// 培训计划列表
export function trainingPlanList(params) {
  return request({
    url: `${base}/api/training/plan/list`,
    method: "post",
    data: params,
  });
}
// 我的培训计划列表
export function trainingPlanMineList(params) {
  return request({
    url: `${base}/api/training/mine/plan/list`,
    method: "post",
    data: params,
  });
}
// 培训计划创建
export function trainingPlanCreate(params) {
  return request({
    url: `${base}/api/training/plan/create`,
    method: "post",
    data: params,
  });
}
// 培训计划详情
export function trainingPlanDetail(params) {
  return request({
    url: `${base}/api/training/plan/detail`,
    method: "post",
    data: params,
  });
}
// 培训计划修改
export function trainingPlanUpdate(params) {
  return request({
    url: `${base}/api/training/plan/update`,
    method: "put",
    data: params,
  });
}
// 培训计划导出
export function trainingPlanListExport(params) {
  return request({
    url: `${base}/api/training/plan/list/export`,
    method: "post",
    data: params,
  });
}
// 不同范围用户下拉
export function trainingUserOption(params) {
  return request({
    url: `${base}/api/training/plan/different/range/user/option`,
    method: "post",
    data: params,
  });
}
// 培训计划生效
export function trainingPlanTookeffect(params) {
  return request({
    url: `${base}/api/training/plan/tookeffect`,
    method: "post",
    data: params,
  });
}
// 培训计划已培训
export function trainingPlanTrained(params) {
  return request({
    url: `${base}/api/training/plan/trained`,
    method: "post",
    data: params,
  });
}
// 培训计划作废
export function trainingPlanCancellation(params) {
  return request({
    url: `${base}/api/training/plan/cancellation`,
    method: "post",
    data: params,
  });
}
// 培训计划导出
export function trainingPlanExport(params) {
  return request({
    url: `${base}/api/training/plan/detail/export`,
    method: "post",
    data: params,
  });
}
export function trainingPlanOptions(params) {
  return request({
    url: `${base}/api/training/plan/options`,
    method: "post",
    data: params,
  });
}
// 修改被培训人培训信息
export function trainingPlanStatusUpdate(params) {
  return request({
    url: `${base}/api/training/plan/participation/status/update`,
    method: "post",
    data: params,
  });
}
// 删除
export function trainingPlanDelete(params) {
  return request({
    url: `${base}/api/training/plan/delete`,
    method: "delete",
    data: params,
  });
}
// 列表
export function ExamQuestionList(params) {
  return request({
    url: `${base}/api/training/examination/question/list`,
    method: "post",
    data: params,
  });
}
// 新增
export function ExamQuestionCreate(params) {
  return request({
    url: `${base}/api/training/examination/question/create`,
    method: "post",
    data: params,
  });
}
// 详情
export function ExamQuestionDetail(params) {
  return request({
    url: `${base}/api/training/examination/question/detail`,
    method: "post",
    data: params,
  });
}
// 编辑
export function ExamQuestionUpdate(params) {
  return request({
    url: `${base}/api/training/examination/question/update`,
    method: "put",
    data: params,
  });
}
// 删除
export function ExamQuestionDelete(params) {
  return request({
    url: `${base}/api/training/examination/question/delete`,
    method: "delete",
    data: params,
  });
}
// 列表
export function ExamPaperList(params) {
  return request({
    url: `${base}/api/training/examination/paper/list`,
    method: "post",
    data: params,
  });
}
export function ExamQuestionImport(params) {
  return request({
    url: `${base}/api/training/examination/question/import`,
    method: "post",
    data: params,
  });
}
// 新增
export function ExamPaperCreate(params) {
  return request({
    url: `${base}/api/training/examination/paper/create`,
    method: "post",
    data: params,
  });
}
// 详情
export function ExamPaperDetail(params) {
  return request({
    url: `${base}/api/training/examination/paper/detail`,
    method: "post",
    data: params,
  });
}
// 编辑
export function ExamPaperUpdate(params) {
  return request({
    url: `${base}/api/training/examination/paper/update`,
    method: "put",
    data: params,
  });
}
// 删除
export function ExamPaperDelete(params) {
  return request({
    url: `${base}/api/training/examination/paper/delete`,
    method: "delete",
    data: params,
  });
}
// 生效
export function ExamPaperTookeffect(params) {
  return request({
    url: `${base}/api/training/examination/paper/took_effect`,
    method: "post",
    data: params,
  });
}
// 关闭
export function ExamPaperClose(params) {
  return request({
    url: `${base}/api/training/examination/paper/close`,
    method: "post",
    data: params,
  });
}
// 考核记录列表
export function ExamRecordList(params) {
  return request({
    url: `${base}/api/training/examination/record/list`,
    method: "post",
    data: params,
  });
}
// 开始考试
export function ExamBegin(params) {
  return request({
    url: `${base}/api/training/examination/exam/begin`,
    method: "post",
    data: params,
  });
}
// 缓存做题结果
export function ExamQuestionCache(params) {
  return request({
    url: `${base}/api/training/examination/question/cache`,
    method: "post",
    data: params,
  });
}
// 试卷详情
export function ExamRecordDetail(params) {
  return request({
    url: `${base}/api/training/examination/record/detail`,
    method: "post",
    data: params,
  });
}
// 提交试卷
export function ExamCommit(params) {
  return request({
    url: `${base}/api/training/examination/exam/commit`,
    method: "post",
    data: params,
  });
}
// 提交试卷
export function ExamRecordUpdateResult(params) {
  return request({
    url: `${base}/api/training/examination/record/update_result`,
    method: "put",
    data: params,
  });
}
// 列表
export function CapaList(params) {
  return request({
    url: `${base}/api/qms/capa/list`,
    method: "post",
    data: params,
  });
}
// 新增
export function CapaInitiated(params) {
  return request({
    url: `${base}/api/qms/capa/initiated`,
    method: "post",
    data: params,
  });
}
// 更新发起
export function CapaUpdate(params) {
  return request({
    url: `${base}/api/qms/capa/update`,
    method: "post",
    data: params,
  });
}
// 评估影响
export function CapaAssess(params) {
  return request({
    url: `${base}/api/qms/capa/assess`,
    method: "post",
    data: params,
  });
}
// 纠正与预防
export function CapaCorrectPrevent(params) {
  return request({
    url: `${base}/api/qms/capa/correct_prevent`,
    method: "post",
    data: params,
  });
}
// 复核
export function CapaCheck(params) {
  return request({
    url: `${base}/api/qms/capa/check`,
    method: "post",
    data: params,
  });
}
// 驳回
export function CapaReject(params) {
  return request({
    url: `${base}/api/qms/capa/reject`,
    method: "post",
    data: params,
  });
}
// 详情
export function CapaDetail(params) {
  return request({
    url: `${base}/api/qms/capa/detail`,
    method: "post",
    data: params,
  });
}
// 删除
export function CapaDelete(params) {
  return request({
    url: `${base}/api/qms/capa/delete`,
    method: "post",
    data: params,
  });
}
// 生成报告
export function CapaGenerateReport(params) {
  return request({
    url: `${base}/api/qms/capa/generate_report`,
    method: "post",
    data: params,
  });
}
// 导出报告
export function CapaExportReport(params) {
  return request({
    url: `${base}/api/qms/capa/export_report`,
    method: "post",
    data: params,
  });
}

// 通过客户id获取用户
export function AdminListByCustomer(params) {
  return request({
    url: `${base}/api/admin/list_by_customer`,
    method: "post",
    data: params,
  });
}
// 温度报告未归档
export function WaybillNoPlace(params) {
  return request({
    url: `${base}/api/qms/filing/waybill/no/place`,
    method: "post",
    data: params,
  });
}
// 温度报告已归档
export function WaybillPlace(params) {
  return request({
    url: `${base}/api/qms/filing/waybill/place`,
    method: "post",
    data: params,
  });
}
// 异常未归档
export function AbnormalNoPlace(params) {
  return request({
    url: `${base}/api/qms/filing/abnormal/no/place`,
    method: "post",
    data: params,
  });
}
// 异常已归档
export function AbnormalPlace(params) {
  return request({
    url: `${base}/api/qms/filing/abnormal/place`,
    method: "post",
    data: params,
  });
}
// 回单未归档
export function ReceiptNoPlace(params) {
  return request({
    url: `${base}/api/qms/filing/receipt/no/place`,
    method: "post",
    data: params,
  });
}
// 回单已归档
export function ReceiptPlace(params) {
  return request({
    url: `${base}/api/qms/filing/receipt/place`,
    method: "post",
    data: params,
  });
}
// 验证列表
export function VerifyRecordList(params) {
  return request({
    url: `${base}/api/verify/record/list`,
    method: "post",
    data: params,
  });
}
// 验证创建
export function VerifyRecordCreate(params) {
  return request({
    url: `${base}/api/verify/record/create`,
    method: "post",
    data: params,
  });
}
// 验证编辑
export function VerifyRecordUpdate(params) {
  return request({
    url: `${base}/api/verify/record/update`,
    method: "put",
    data: params,
  });
}
// 验证详情
export function VerifyRecordDetail(params) {
  return request({
    url: `${base}/api/verify/record/detail`,
    method: "post",
    data: params,
  });
}
// 验证删除
export function VerifyRecordDelete(params) {
  return request({
    url: `${base}/api/verify/record/delete`,
    method: "delete",
    data: params,
  });
}
// 验证导出
export function VerifyRecordExport(params) {
  return request({
    url: `${base}/api/verify/record/list/export`,
    method: "post",
    data: params,
  });
}
// 偏差列表
export function DeviationList(params) {
  return request({
    url: `${base}/api/qms/deviation/list`,
    method: "post",
    data: params,
  });
}
// 新增
export function DeviationCreate(params) {
  return request({
    url: `${base}/api/qms/deviation/create`,
    method: "post",
    data: params,
  });
}
// 详情
export function DeviationDetail(params) {
  return request({
    url: `${base}/api/qms/deviation/detail`,
    method: "post",
    data: params,
  });
}
// 修改
export function DeviationUpdate(params) {
  return request({
    url: `${base}/api/qms/deviation/update`,
    method: "post",
    data: params,
  });
}
// 删除
export function DeviationDelete(params) {
  return request({
    url: `${base}/api/qms/deviation/delete`,
    method: "post",
    data: params,
  });
}
// 变更列表
export function ChangeList(params) {
  return request({
    url: `${base}/api/qms/change/list`,
    method: "post",
    data: params,
  });
}
// 新增
export function ChangeCreate(params) {
  return request({
    url: `${base}/api/qms/change/create`,
    method: "post",
    data: params,
  });
}
// 详情
export function ChangeDetail(params) {
  return request({
    url: `${base}/api/qms/change/detail`,
    method: "post",
    data: params,
  });
}
// 修改
export function ChangeUpdate(params) {
  return request({
    url: `${base}/api/qms/change/update`,
    method: "post",
    data: params,
  });
}
// 删除
export function ChangeDelete(params) {
  return request({
    url: `${base}/api/qms/change/delete`,
    method: "post",
    data: params,
  });
}

// 审计新增
export function reqAddAudit(params) {
  return request({
    url: `${base}/api/qms/audit/create`,
    method: "post",
    data: params,
  });
}

// 审计详情
export function reqAuditDetail(params) {
  return request({
    url: `${base}/api/qms/audit/detail`,
    method: "post",
    data: params,
  });
}

// 审计删除
export function reqDeleteAudit(params) {
  return request({
    url: `${base}/api/qms/audit/delete`,
    method: "post",
    data: params,
  });
}

// 审计列表
export function reqAuditList(params) {
  return request({
    url: `${base}/api/qms/audit/list`,
    method: "post",
    data: params,
  });
}

// 审计编辑
export function reqUpdateAudit(params) {
  return request({
    url: `${base}/api/qms/audit/update`,
    method: "post",
    data: params,
  });
}

// 审计通过
export function reqAdoptAudit(params) {
  return request({
    url: `${base}/api/qms/audit/pass`,
    method: "post",
    data: params,
  });
}

// 审计驳回
export function reqRejectAudit(params) {
  return request({
    url: `${base}/api/qms/audit/reject`,
    method: "post",
    data: params,
  });
}
// 证书管理列表
export function certificateList(params) {
  return request({
    url: `${base}/api/certificate/list`,
    method: "post",
    data: params,
  });
}
// 证书管理新增
export function certificateCreate(params) {
  return request({
    url: `${base}/api/certificate/create`,
    method: "post",
    data: params,
  });
}
// 证书管理编辑
export function certificateUpdate(params) {
  return request({
    url: `${base}/api/certificate/update`,
    method: "post",
    data: params,
  });
}
// 证书管理详情
export function certificateDetail(params) {
  return request({
    url: `${base}/api/certificate/detail`,
    method: "post",
    data: params,
  });
}
// 证书管理删除
export function certificateDelete(params) {
  return request({
    url: `${base}/api/certificate/delete`,
    method: "post",
    data: params,
  });
}
// 证书管理下载证书
export function certificateDownload(params) {
  return request({
    url: `${base}/api/certificate/download`,
    method: "post",
    data: params,
  });
}
// 文件模板下拉
export function FileTemplateOptions(params) {
  return request({
    url: `${base}/api/training/file/comment/options`,
    method: "post",
    data: params,
  });
}
// 文件模板新增
export function FileTemplateCreate(params) {
  return request({
    url: `${base}/api/training/file/comment/create`,
    method: "post",
    data: params,
  });
}
// 文件模板修改
export function FileTemplateUpdate(params) {
  return request({
    url: `${base}/api/training/file/comment/update`,
    method: "post",
    data: params,
  });
}
// 文件模板修改
export function FileTemplateDetail(params) {
  return request({
    url: `${base}/api/training/file/comment/detail`,
    method: "post",
    data: params,
  });
}
// 文件模板列表
export function FileTemplateList(params) {
  return request({
    url: `${base}/api/training/file/comment/list`,
    method: "post",
    data: params,
  });
}
// 文件模板列表
export function FileTemplateDelete(params) {
  return request({
    url: `${base}/api/training/file/comment/delete`,
    method: "post",
    data: params,
  });
}
